<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditCompanysTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditCompanysLabel_companyID}" for="companyID" />
                    <h:inputText id="companyID" value="#{companysController.selected.companyID}" title="#{bundle.EditCompanysTitle_companyID}" />
                    <h:outputLabel value="#{bundle.EditCompanysLabel_companyName}" for="companyName" />
                    <h:inputText id="companyName" value="#{companysController.selected.companyName}" title="#{bundle.EditCompanysTitle_companyName}" required="true" requiredMessage="#{bundle.EditCompanysRequiredMessage_companyName}"/>
                    <h:outputLabel value="#{bundle.EditCompanysLabel_companyDescription}" for="companyDescription" />
                    <h:inputTextarea rows="4" cols="30" id="companyDescription" value="#{companysController.selected.companyDescription}" title="#{bundle.EditCompanysTitle_companyDescription}" />
                    <h:outputLabel value="#{bundle.EditCompanysLabel_address}" for="address" />
                    <h:inputText id="address" value="#{companysController.selected.address}" title="#{bundle.EditCompanysTitle_address}" required="true" requiredMessage="#{bundle.EditCompanysRequiredMessage_address}"/>
                    <h:outputLabel value="#{bundle.EditCompanysLabel_phoneNo}" for="phoneNo" />
                    <h:inputText id="phoneNo" value="#{companysController.selected.phoneNo}" title="#{bundle.EditCompanysTitle_phoneNo}" required="true" requiredMessage="#{bundle.EditCompanysRequiredMessage_phoneNo}"/>
                    <h:outputLabel value="#{bundle.EditCompanysLabel_fax}" for="fax" />
                    <h:inputText id="fax" value="#{companysController.selected.fax}" title="#{bundle.EditCompanysTitle_fax}" />
                    <h:outputLabel value="#{bundle.EditCompanysLabel_website}" for="website" />
                    <h:inputText id="website" value="#{companysController.selected.website}" title="#{bundle.EditCompanysTitle_website}" />
                    <h:outputLabel value="#{bundle.EditCompanysLabel_email}" for="email" />
                    <h:inputText id="email" value="#{companysController.selected.email}" title="#{bundle.EditCompanysTitle_email}" required="true" requiredMessage="#{bundle.EditCompanysRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.EditCompanysLabel_logo}" for="logo" />
                    <h:inputText id="logo" value="#{companysController.selected.logo}" title="#{bundle.EditCompanysTitle_logo}" required="true" requiredMessage="#{bundle.EditCompanysRequiredMessage_logo}"/>
                    <h:outputLabel value="#{bundle.EditCompanysLabel_imageURL}" for="imageURL" />
                    <h:inputText id="imageURL" value="#{companysController.selected.imageURL}" title="#{bundle.EditCompanysTitle_imageURL}" />
                    <h:outputLabel value="#{bundle.EditCompanysLabel_createDate}" for="createDate" />
                    <h:inputText id="createDate" value="#{companysController.selected.createDate}" title="#{bundle.EditCompanysTitle_createDate}" />
                    <h:outputLabel value="#{bundle.EditCompanysLabel_createUserID}" for="createUserID" />
                    <h:selectOneMenu id="createUserID" value="#{companysController.selected.createUserID}" title="#{bundle.EditCompanysTitle_createUserID}" >
                        <f:selectItems value="#{member1Controller.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditCompanysLabel_companyTypeID}" for="companyTypeID" />
                    <h:selectOneMenu id="companyTypeID" value="#{companysController.selected.companyTypeID}" title="#{bundle.EditCompanysTitle_companyTypeID}" required="true" requiredMessage="#{bundle.EditCompanysRequiredMessage_companyTypeID}">
                        <f:selectItems value="#{companyTypeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{companysController.update}" value="#{bundle.EditCompanysSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditCompanysViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{companysController.prepareList}" value="#{bundle.EditCompanysShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditCompanysIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
